#define  _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
#include"SpecialClassDesign.h"

void test_heap_only()
{
	//HeapOnly hp1;
	//static HeapOnly hp2;
	//HeapOnly* hp3 = new HeapOnly;
	HeapOnly* hp3 = HeapOnly::CreaterObj();
	////delete hp3;
	hp3->Destroy();
}

void test_stack_only()
{
	//StackOnly hp1;
	//static StackOnly hp2;
	//StackOnly* hp3 = new StackOnly;
	
	StackOnly hp4 = StackOnly::CreaterObj();
	//StackOnly* hp5 = new StackOnly(hp4);
}

using namespace hugry;
void test_singleton()
{
	cout << &hugry::singleton::GetInstance() << endl;
	cout << &hugry::singleton::GetInstance() << endl;
	cout << &hugry::singleton::GetInstance() << endl;

	//hugry::singleton copy(hugry::singleton::GetInstance());
}

int main()
{
	/*test_heap_only();
	test_stack_only();*/
	test_singleton();

	return 0;
}